<?php
include("../model/configuration.php");
include("../model/function.php");
if(isset($_SESSION['username']) and isset($_SESSION['password'])){
?>
<form name="user_add" id="user_add" action="user_result.php" method="post">

<table width="98%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="250">User Name</td>
    <td width="395"><input type="text" name="username"  id="username" size="50"/></td>
  </tr>
  <tr>
    <td width="250">Password</td>
    <td width="395"><input type="password" name="password"  id="password" size="50"/></td>
  </tr>
  <tr>
	<td width="250">Level</td>
	<td><select name="level">
    <option value="0">--Pilih Level--</option>
	<?php
	$query=dbQuery("select * from level order by id_level");
		while($data=dbAssoc($query)){
		echo"<option value='$data[id_level]'>$data[nama_level]</option>";
		}
	?>
	</select></td>
  </tr>
  <tr>
    <td width="250">Nama Lengkap</td>
    <td width="395"><input type="text" name="nama_pengguna"  id="nama_pengguna" size="50"/></td>
  </tr>
  <tr>
    <td width="250">Alamat</td>
    <td width="395"><input type="text" name="alamat_pengguna"  id="alamat_pengguna" size="50"/></td>
  </tr>
  <tr>
    <td width="250">Email</td>
    <td width="395"><input type="text" name="email_pengguna"  id="email_pengguna" size="50"/></td>
  </tr>
  <tr>
    <td width="250">Nomor Telepon</td>
    <td width="395"><input type="text" name="telp_pengguna"  id="telp_pengguna" size="50"/></td>
  </tr>
  <tr>
	<td width="250">Jenis Identitas</td>
	<td><select name="id_jenis_id">
    <option value="0">--Pilih Jenis Identitas--</option>
	<?php
	$query=dbQuery("select * from jenis_identitas order by id_jenis_id");
		while($data=dbAssoc($query)){
		echo"<option value='$data[id_jenis_id]'>$data[nama_jenis_identitas]</option>";
		}
	?>
	</select></td>
  </tr>
  <tr>
    <td width="250">Nomor Identitas</td>
    <td width="395"><input type="text" name="no_identitas_pengguna"  id="no_identitas_pengguna" size="50"/></td>
  </tr>
  <tr>
    <td><input type="submit" name="user_add" value="SIMPAN"></td>
  </tr>
</table> </form> 
<?php
}else{ 
header("Location:../administrator/test.html");
}
?>